<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title></title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<link rel="stylesheet" type="text/css" href="/static/shop/account/css/style.css"/>
	<link rel="stylesheet" type="text/css" href="/static/shop/account/css/swiper.min.css"/>
	<link rel="stylesheet" href="/static/shop/account/css/LCalendar.css">
</head>
<body>
<div class="login">
	<a href="{:url('/')}" title="首页">
		<img style = 'width: 9rem;
    margin-top: 1rem;'src="__MODULE_IMG__/logo.png">
	</a>
	<ul>
		{notempty name='user'}
		<!--<a href="/account/update/" title="" class="ucter">
            欢迎  {$user.mobile}
        </a>
        <span class="separate">|</span>-->
		<a href="{:url('shop/account/index')}" title="个人中心">个人中心</a>
		<span class="separate">|</span>
		<!--
                        <a href="{:url('shop/account/love')}" title="我的关注">我的关注</a>

                        <span class="separate">|</span>
                        <a href="{:url('shop/artwork/cart')}" title="购物车">购物车</a>
                        <span class="separate">|</span>-->
		<a href="{:url('shop/login/logout')}" title="退出">退出</a>
		{else/}

		<li><a href="{:url('shop/login/index')}" title="登录">登录</a></li>
		<li>|</li>
		<li><a href="{:url('shop/login/register')}" title="注册">注册</a></li>
		{/notempty}
	</ul>
</div>
<?php $account_select="个人资料" ;?>
{include file="public:nav"/}
{include file="public:menu"/}

<ul class="index_xuan">
	<li class="bor">账户信息</li>
	<li>认证信息</li>
	<li><a href="{:url('shop/like/index')}" style="color:#FFFFFF;">我的喜好</a></li>
	<li><a href="{:url('shop/account/address')}" style="color:#FFFFFF;">收货地址</a></li>
</ul>

<div class="inp">
	<p>姓名：<input type="text" id="name" value="{$userInfo['name']}" style=""></p>
	<p>性别：
		<span style="margin-left: 2.7rem;">
  				<label for="sex0">
                        <input type="radio" name="sex" value="保密"  {if condition="$userInfo['sex'] eq '保密'"} checked="checked" {/if} tabindex="2"  id="sex0" style="width: 32px; "/>保密
                    </label>
            		<label for="sex1">
                        <input type="radio" name="sex" value="男" {if condition="$userInfo['sex'] eq '男'"}checked="checked" {/if} tabindex="3"  id="sex1" style="width: 32px; "/>男
                    </label>
            		<label for="sex2">
                        <input type="radio" name="sex" value="女" {if condition="$userInfo['sex'] eq '女'"} checked="checked" {/if}  tabindex="4"  id="sex2" style="width: 32px; "/>女
                    </label>
  				</span>
	</p>
	<p>出生日期：<input type="text" value="{$userInfo['birthday']}" placeholder="请选择日期" id="demo1"/></p>
	<p>手机号码：<input type="text" id="mobile" value="{$userInfo['mobile']}"  placeholder="请输入手机号"/></p>
	<p>邮寄地址：<input type="text" id="address" value="{$userInfo['address']}" placeholder="请输入地址"/></p>
	<p>邮政编码：<input type="text" id="postcode" value="{$userInfo['postcode']}" placeholder="请输入邮政编码"/></p>
	<p>教育程度：
		<select name="education"   id="education" style="">
			<option value="0"  {if condition="$userInfo['education'] eq '0'"} selected="selected" {/if}>
			请选择...
			</option>
			<option value="博士以及以上" {if condition="$userInfo['education'] eq '博士以及以上'"} selected="selected" {/if}>博士以及以上</option>
			<option value="硕士" {if condition="$userInfo['education'] eq '硕士'"} selected="selected" {/if} >硕士</option>
			<option value="本科" {if condition="$userInfo['education'] eq '本科'"} selected="selected" {/if}>本科</option>
			<option value="大专" {if condition="$userInfo['education'] eq '大专'"} selected="selected" {/if}>大专</option>
			<option value="其他" {if condition="$userInfo['education'] eq '其他'"} selected="selected" {/if}>其他</option>
			<select>
	</p>
	<p>毕业院校：<input type="text" id="school" value="{$userInfo['school']}"placeholder="请输入院校"/></p>
	<p>年收入：
		<select name="income"   id="income" style="">
			<option value="0"  {if condition="$userInfo['income'] eq '0'"} selected="selected" {/if}>请选择...</option>
			<option value="1000万以上" {if condition="$userInfo['income'] eq '1000万以上'"} selected="selected" {/if}>1000万以上</option>
			<option value="500－1000万" {if condition="$userInfo['income'] eq '500－1000万'"} selected="selected" {/if} >500－1000万</option>
			<option value="100－500万" {if condition="$userInfo['income'] eq '100－500万'"} selected="selected" {/if}>100－500万</option>
			<option value="50－100万" {if condition="$userInfo['income'] eq '50－100万'"} selected="selected" {/if}>50－100万</option>
			<option value="10－50万" {if condition="$userInfo['income'] eq '10－50万'"} selected="selected" {/if}>10－50万</option>
			<option value="5－10万" {if condition="$userInfo['income'] eq '5－10万'"} selected="selected" {/if}>5－10万</option>
			<option value="5万以下" {if condition="$userInfo['income'] eq '5万以下'"} selected="selected" {/if}>5万以下</option>
		</select>
	</p>

	<div id="submit" class="details" style="    width: 100%;
    height: 3.15rem;
    background: #231916;
    color: #FFFFFF;
    font-size: 1rem;
    text-align: center;
    line-height: 3.15rem;
    margin-top: 1rem;
    border-radius: .25rem;">
		保存
	</div>
</div>

<div class="call">
	<a href="tel:4006667899" style="    color: #fff;"><img src="/static/shop/mobile/img/tel111.png" /></a>
	<a href="tel:4006667899" style="    color: #fff;"><p>收藏热线：400 666 7899</p></a>
</div>

<div class="footer">
	{include file="public:single"/}
</div>
<p class="icp">网站备案号：晋ICP备10002939号</p>
</body>
<script src="/static/shop/account/js/jquery-3.2.1-min.js"></script>
<script src="/static/shop/account/js/PhoneJs.js"></script>

</html>
<script src="/static/shop/account/js/LCalendar.js"></script>
<script>
    var calendar = new LCalendar();
    calendar.init({
        'trigger': '#demo1', //标签id
        'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
        'minDate': '1900-1-1', //最小日期
        'maxDate': new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate() //最大日期
    });
</script>
<script>
    $(document).ready(function () {
        $("#submit").on("click", function () {
            $.ajax({
                url: "{:url('shop/account/ajaxUserinformation')}",
                type: "POST",
                dataType: "JSON",
                data: {
                    name: $("#name").val(),
                    birthday:$("#demo1").val(),
                    mobile:$("#mobile").val(),
                    address: $("#address").val(),
                    postcode:$("#postcode").val(),
                    income:$("#income").val(),
                    education:$("#education").val(),
                    school:$("#school").val(),
                    sex:$("input[name='sex']:checked").val()
                },
                success: function (data) {
                    alert(data.msg);
                    if (data.code == "0") {
                        window.location.href = "{:url('shop/account/index')}";
                    }

                }
            });
        });
    });
</script>